home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_24134.txt < prev    next >
Text File  |  1991-02-27  |  788b  |  23 lines

  1. -- card: 24134 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. As suggested by the integer representation of characters, characters and integers may be (carefully!) mixed in expressions to accomplish certain tasks:
  11.  
  12.     int    i;
  13.     char    c;
  14.     i = 12;
  15.     c = 'a' + i - 1;
  16.  
  17. (The above assigns c the character which occupies the (i-1)th position after the character 'a' in the machine's character set.  In most character sets, and assuming i is no greater than 26, c will then represent the ith letter of the alphabet.)
  18.  
  19. Character STRINGS are represented as arrays of characters in C.  This will be discussed later in this chapter.
  20.  
  21. -- part contents for background part 7
  22. ----- text -----
  23. 56